package cn.elwy.rcp.ui.explorer.core.model;

import com.yss.sofa.ide.builder.dbscript.vo.ColumnType;

public class MappingRelationship implements Comparable<MappingRelationship> {
  private ColumnType sourceColType;
  private TargetColumnType targetColType;

  /**
   * @return the sourceColType
   */
  public ColumnType getSourceColType() {

    return sourceColType;
  }

  /**
   * @param sourceColType the sourceColType to set
   */
  public void setSourceColType(ColumnType sourceColType) {

    this.sourceColType = sourceColType;
  }

  /**
   * @return the targetColType
   */
  public TargetColumnType getTargetColType() {

    return targetColType;
  }

  /**
   * @param targetColType the targetColType to set
   */
  public void setTargetColType(TargetColumnType targetColType) {

    this.targetColType = targetColType;
  }

  public int compareTo(MappingRelationship other) {
    return sourceColType.getType().compareTo(other.getSourceColType().getType());
  }

}
